package com.wyx.bbs.service;

import com.wyx.bbs.domain.ArticleToUser;
import com.wyx.bbs.domain.Focus;
import com.wyx.bbs.mapper.FocusMapping;
import org.hibernate.annotations.Source;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Wu YunXia
 * @Description:
 * @Date: Created in 16:33 2021/4/26
 * @Modefied By:
 */
@Service
public class FocusService {
    @Resource
FocusMapping focusMapping;

/**
 * 添加
 */
public int addFocus(Focus focus){
    return focusMapping.addFocus(focus);
}

/**
 * 查询关注列表
 */
public List<ArticleToUser> focusList(int uid){
    return focusMapping.focusList(uid);
}

/**
 * 查询用户是否被关注
 */
public List<ArticleToUser> isFollow(int uid, int id){
    return focusMapping.isFollow(uid, id);
}

}
